import React from 'react'
// ===================================================================== Temp
// import FormModal from '#cpt/temp/FormModal'
// ===================================================================== global declare
// ===================================================================== Declare
const { $Lazy } = window
// ===================================================================== Lazy
const Modal 			= $Lazy.state(()=>import('@antd/modal'))
// ===================================================================== component
class Index extends React.Component{
	state = {
		rule: []
	}
	
	open = (rule) => {
		this.setState({rule}, () => this.modalRef.open())
	}
	
	render(){
		const { rule } = this.state
		return <Modal
			title	= '失控提示'
			width 	= {400}
			height  = '30%'
			noOk
			// noCancel
			noText 	= '确认'
			onRef	= { ref => this.modalRef = ref }
			isFullScroll
		>
			<div className='h fv p-modal'>
				{ rule.map(({ level, rule }, i) => <div key={i}>{`水平${level}: 违背[${rule}]`}</div>)}
			</div>
		</Modal>
	}
}

export default Index